import { Injectable } from '@angular/core';



@Injectable({
  providedIn: 'root'
})
export class DomTrackingService {
  created = 0;
  destroyed = 0;
  reused = 0;

  constructor() {

    (window as any).domTrackStats = this;
  }


  reset(): void {
    this.created = 0;
    this.destroyed = 0;
    this.reused = 0;
  }


  incrementCreated(): void {
    this.created++;
  }


  incrementDestroyed(): void {
    this.destroyed++;
  }
}
